package com.sbj.entity;

import cn.zhxu.bs.bean.DbField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sbj.dto.jackson.CustomDecimalSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author summer
 * @version 1.0
 * @date 2024/8/9 11:54
 */
@Data
public class Goods implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("category_id")
    private Integer categoryId;

    private String name;

    private String context;

    private Integer stock;

    @TableField("ruing_price")
    @JsonSerialize(using = CustomDecimalSerialize.class)
    private BigDecimal ruingPrice;

    @TableField("original_price")
    private BigDecimal originalPrice;


    @TableField(value = "createTime")
    private LocalDateTime createTime;

    private String image;

    @TableLogic
    private Integer deleted;

    @TableField("quality_id")
    private Integer qualityId;

    @TableField("isListed")
    private Integer isListed;
}
